package com.example.agent;

import java.lang.instrument.Instrumentation;

public class ApiAgent {
    public static void premain(String agentArgs, Instrumentation inst) {
        System.out.println("API Agent 启动时加载...");
        inst.addTransformer(new ApiTransformer());
    }

    public static void agentmain(String agentArgs, Instrumentation inst) {
        System.out.println("API Agent 运行时附加...");
        inst.addTransformer(new ApiTransformer(), true);
    }
}

